\(\int \cos ^n(e+f x) \sin ^m(e+f x) \, dx\) [336]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 80 \[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=-\frac {\cos ^{1+n}(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1-m}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin ^{-1+m}(e+f x) \sin ^2(e+f x)^{\frac {1-m}{2}}}{f (1+n)} \]

[Out]

-cos(f*x+e)^(1+n)*hypergeom([1/2+1/2*n, 1/2-1/2*m],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)^(-1+m)*(sin(f*x+e)^2)^
(1/2-1/2*m)/f/(1+n)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2656} \[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=-\frac {\sin ^{m-1}(e+f x) \sin ^2(e+f x)^{\frac {1-m}{2}} \cos ^{n+1}(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1-m}{2},\frac {n+1}{2},\frac {n+3}{2},\cos ^2(e+f x)\right )}{f (n+1)} \]

[In]

Int[Cos[e + f*x]^n*Sin[e + f*x]^m,x]

[Out]

-((Cos[e + f*x]^(1 + n)*Hypergeometric2F1[(1 - m)/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2]*Sin[e + f*x]^(-1 +
m)*(Sin[e + f*x]^2)^((1 - m)/2))/(f*(1 + n)))

Rule 2656

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b^(2*IntPar
t[(n - 1)/2] + 1))*(b*Sin[e + f*x])^(2*FracPart[(n - 1)/2])*((a*Cos[e + f*x])^(m + 1)/(a*f*(m + 1)*(Sin[e + f*
x]^2)^FracPart[(n - 1)/2]))*Hypergeometric2F1[(1 + m)/2, (1 - n)/2, (3 + m)/2, Cos[e + f*x]^2], x] /; FreeQ[{a
, b, e, f, m, n}, x] && SimplerQ[n, m]

Rubi steps \begin{align*} \text {integral}& = -\frac {\cos ^{1+n}(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1-m}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin ^{-1+m}(e+f x) \sin ^2(e+f x)^{\frac {1-m}{2}}}{f (1+n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.99 \[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=\frac {\cos ^{-1+n}(e+f x) \cos ^2(e+f x)^{\frac {1-n}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+m}{2},\frac {1-n}{2},\frac {3+m}{2},\sin ^2(e+f x)\right ) \sin ^{1+m}(e+f x)}{f (1+m)} \]

[In]

Integrate[Cos[e + f*x]^n*Sin[e + f*x]^m,x]

[Out]

(Cos[e + f*x]^(-1 + n)*(Cos[e + f*x]^2)^((1 - n)/2)*Hypergeometric2F1[(1 + m)/2, (1 - n)/2, (3 + m)/2, Sin[e +
 f*x]^2]*Sin[e + f*x]^(1 + m))/(f*(1 + m))

Maple [F]

\[\int \left (\cos ^{n}\left (f x +e \right )\right ) \left (\sin ^{m}\left (f x +e \right )\right )d x\]

[In]

int(cos(f*x+e)^n*sin(f*x+e)^m,x)

[Out]

int(cos(f*x+e)^n*sin(f*x+e)^m,x)

Fricas [F]

\[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=\int { \cos \left (f x + e\right )^{n} \sin \left (f x + e\right )^{m} \,d x } \]

[In]

integrate(cos(f*x+e)^n*sin(f*x+e)^m,x, algorithm="fricas")

[Out]

integral(cos(f*x + e)^n*sin(f*x + e)^m, x)

Sympy [F]

\[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=\int \sin ^{m}{\left (e + f x \right )} \cos ^{n}{\left (e + f x \right )}\, dx \]

[In]

integrate(cos(f*x+e)**n*sin(f*x+e)**m,x)

[Out]

Integral(sin(e + f*x)**m*cos(e + f*x)**n, x)

Maxima [F]

\[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=\int { \cos \left (f x + e\right )^{n} \sin \left (f x + e\right )^{m} \,d x } \]

[In]

integrate(cos(f*x+e)^n*sin(f*x+e)^m,x, algorithm="maxima")

[Out]

integrate(cos(f*x + e)^n*sin(f*x + e)^m, x)

Giac [F]

\[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=\int { \cos \left (f x + e\right )^{n} \sin \left (f x + e\right )^{m} \,d x } \]

[In]

integrate(cos(f*x+e)^n*sin(f*x+e)^m,x, algorithm="giac")

[Out]

integrate(cos(f*x + e)^n*sin(f*x + e)^m, x)

Mupad [B] (verification not implemented)

Time = 2.25 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.89 \[ \int \cos ^n(e+f x) \sin ^m(e+f x) \, dx=-\frac {{\cos \left (e+f\,x\right )}^{n+1}\,{\sin \left (e+f\,x\right )}^{m+1}\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2}-\frac {m}{2},\frac {n}{2}+\frac {1}{2};\ \frac {n}{2}+\frac {3}{2};\ {\cos \left (e+f\,x\right )}^2\right )}{f\,\left (n+1\right )\,{\left ({\sin \left (e+f\,x\right )}^2\right )}^{\frac {m}{2}+\frac {1}{2}}} \]

[In]

int(cos(e + f*x)^n*sin(e + f*x)^m,x)

[Out]

-(cos(e + f*x)^(n + 1)*sin(e + f*x)^(m + 1)*hypergeom([1/2 - m/2, n/2 + 1/2], n/2 + 3/2, cos(e + f*x)^2))/(f*(
n + 1)*(sin(e + f*x)^2)^(m/2 + 1/2))